﻿using Domain.Entitys;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Configers
{
    public class CMConfigure : IEntityTypeConfiguration<CM>
    {
        public void Configure(EntityTypeBuilder<CM> builder)
        {
            builder.ToTable(nameof(CM));
            builder.HasKey(p => p.MakId);
            builder.Property(p => p.MajorKindId).IsRequired(false).HasMaxLength(50);
            builder.Property(p => p.MajorKindName).IsRequired(false).HasMaxLength(100);
            builder.Property(p => p.MajorId).IsRequired(false).HasMaxLength(50);
            builder.Property(p => p.MajorName).IsRequired(false).HasMaxLength(100);
            builder.Property(p => p.TestAmount).IsRequired();
        }
    }
}
